<template>
	<view class="AppHeaders" :style="{color,backgroundColor:bgCOLOR}"></view>
</template>

<script>
export default {
	name: '',
	props:{
		color:{
			type:String,
			default:"#000"
		},
		bgcolor:{
			type:String,
			default:"#fff"
		}
	},
	data() {
		return {
			heights: '0',
			Y_bgcolor:'#fff',
			system:"10.0"
		};
	},
	computed:{
		bgCOLOR(){
			return this.CurrentTheme.name==='DarkMode'?'rgba(0, 0, 0)':'#fff'
		}
	},
	async created() {
		//#ifdef APP-PLUS
		let res = await uni.getSystemInfo({});
		if(!res[0]){
			this.system = res[1].system
		}
		// #endif	
		// this.Y_bgcolor =  this.system=="5.1.1"?"rgba(0, 0, 0, 0.5)": 'transparent'
		
		this.bgcolor ? this.Y_bgcolor = this.bgcolor :""
	},
	mounted() {
		// #ifdef APP-PLUS
		this.heights = plus.navigator.getStatusbarHeight() + 'px';
		// #endif
	},
	methods: {
		open() {
			this.$emit('send');
		}
	}
};
</script>

<style scoped>
.AppHeaders {
	z-index: 99;
	position: sticky;
	top: 0;
	/* #ifdef  APP-PLUS  */
	height: calc(var(--status-bar-height));
	// margin-top: calc(var(--status-bar-height));
	/* #endif */
}
</style>
